import React, { PureComponent } from 'react'
export default function Loadable(Wcomponent) {
    return  class  extends PureComponent {
        state={
            Template:null
        }
        render() {
            let {Template} = this.state
            return (
                Template?<Template {...this.props}/>:null
            )
        }
        async componentDidMount(){
            let module = await Wcomponent()
            this.setState({
                Template:module.default
            })
        }
    }
}


